const HttpClass = require('./Class/Http')
const storageModule = require('@/storage/index')
module.exports = new HttpClass({
  httpMethod: wx.downloadFile,
  baseURL: '',
  header: {
    'content-type': 'application/x-www-form-urlencoded'
  },
  timeout: 1000 * 30,
  interceptors: {
    request(config) {
    //   console.log(config)
      // 添加请求头 token
      config.header['token'] = storageModule.getToken()
      return config
    },
    response(res, error) {
      return res || error
    }
  }
})

